<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目申请</title>
    <link rel="stylesheet" href="__VENDOR__/css/head.css">
    <link rel="stylesheet" href="__VENDOR__/css/foot.css">
    <link rel="stylesheet" href="__VENDOR__/css/demand.css">
    <link rel="stylesheet" href="__VENDOR__/css/project.css">
    <link rel="stylesheet" href="__VENDOR__/css/style.css">
    <script src="__VENDOR__/js/jquery-1.12.2.js"></script>
    <script src="__VENDOR__/js/ajax.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/js/region.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script src="__VENDOR__/js/button.js"></script>
	<link rel="stylesheet" href="/Public/Home/extend/css/head.css">
</head>
<body style="background: #f6f6f6">

<div class="head">
    <div class="head_div">
        <img style="float: left;display: block;margin-top: -10px" src="/Public/Home/extend/img/banner1.jpg" alt="">
        <div class="fl">
            <span>湖州交警支队在线审批</span>
            <span>http://www.hzjxj.com</span>
        </div>
        <div class="fr">
            <ul>
                <li><a href="/Home/Index/index.html">审批主页</a></li>
                <li><a href="/Home/Index/process.html">流程查询</a></li>
                <li><a href="/Home/Index/project.html" class="hover">项目申请</a></li>
                <li><a href="/Home/Index/apply_for.html">申请查询</a></li>
                <li><a href="/Home/Index/true_false.html">真伪查询</a></li>
            </ul>
        </div>
    </div>
</div>

<form class="form form-horizontal" id="form-add" enctype="multipart/form-data">
    <div class="project_content">
    <div class="demand_div">
        <div class="demand_div1">
            <img src="__VENDOR__/img/1.jpg" alt="">
            <span>项目申请</span>
        </div>
    </div>
    <div class="project_div">
      <div>
          <span>项目类别选择：</span>

          <div style="margin: 0" class="c-dropdown js-dropdown">
              <input type="hidden" name="p_id" id="p_id" class="js-dropdown__input" value="">
              <span class="c-button c-button--dropdown js-dropdown__current" >请选择{{:str_repeat("&nbsp;",55)}}</span>
              <ul class="c-dropdown__list" >
                  <foreach name="projects" item="row" >
                      <li class="c-dropdown__item" data-dropdown-value="{{$row['id']}}">{{$row['name']}}</li>
                  </foreach>
              </ul>
          </div>

      </div>
        <div>
            <span>项目名称：</span>
            <input type="text" placeholder="请输入项目名称" name="apply_name" value="">
        </div>
        <div>
            <span>附件上传：</span>
            <div style="margin: 0;" id="form1" class="uploader white">
                <input type="text" class="filename" name="path" placeholder="所有资料请一次性打包压缩后上传" readonly/><span style="display: block;width: 110px;height: 40px;position: absolute;right: 0;background: #063892;color: white;border-radius: 0 6px 6px 0;text-align: center;line-height: 40px">选择上传</span>
                <input type="file" name="upfile"/>
            </div>

            &nbsp;&nbsp;&nbsp;<span>参考资料下载：<a style="color: #063892;text-decoration: none" id="data" href="" ></a></span>
        </div>
        <div class="check" >
            <span>材料寄送：</span>
            <lable>
                <i class='input_style radio_bg radio_bg_check'><input type="radio" checked="checked" name="is_deliver" value="2" checked></i>
                <span>否</span>
            </lable>
            <lable>
                <i class='input_style radio_bg'><input type="radio" name="is_deliver" value="1"></i>
                <span>是</span>
            </lable>
        </div>
        <div class="text se jianrong">
            <span>快递单号：</span>
            <input type="tel" placeholder="请输入快递单号" name="tracking_no" value="">
        </div>
    </div>
    <div class="project_div1">
        <div class="div1">主审单位</div>
        <div class="zhushendanwei">
            <div>
                <span>主审单位：</span>
                <input type="text" placeholder="请输入主审单位" name="company_name" value="">
            </div>
            <div>
                <span>部门：</span>
                <input type="text" placeholder="请输入部门" name="depart_name" value="">
            </div>
            <div>
                <span>联系人：</span>
                <input type="text" placeholder="请输入联系人" name="contact" value="">
            </div>
            <div>
                <span>职务(选填)：</span>
                <input type="text" placeholder="请输入职务" name="position_name" value="">
            </div>
            <div>
                <span>电话号码：</span>
                <input type="tel" placeholder="请输入电话号码" name="contact_phone" value="">
            </div>
            <div class="form">
                <span>邮寄地址：</span>
                <div class="form_div" style="display: inline-block;margin-left: -30px;">
                <select  name="contact_p" id="selProvincesContact" onchange="region.changed(this, 2, 'selCitiesContact')">
                    <option value="">选择省</option>
                    <foreach name="provinces" item="row" >
                        <option value="{{$row['code']}}">{{$row['fullName']}}</option>
                    </foreach>
                </select>
                <select name="contact_c" id="selCitiesContact" onchange="region.changed(this, 3, 'selDistrictsContact')">
                    <option value="">选择市</option>
                </select>
                <select name="contact_d" id="selDistrictsContact">
                    <option value="">选择区</option>
                </select>
                </div>
                <input name="contact_address" type="text" placeholder="具体收件地址">
            </div>
        </div>
    </div>
    <div class="project_div2">
        <div class="check1 " >
            <span>现场踏勘：</span>
            <lable>
                <i class='input_style radio_bg radio_bg_check'><input type="radio" name="need_survey" value="2" checked></i>
                不需要
            </lable>
            <lable>
                <i class='input_style radio_bg'><input type="radio" name="need_survey" value="1"></i>
                需要
            </lable>
        </div>
        <div class="text1 se">
            <div class="jianrong" style="margin-left:30px ">
                <span>时间：</span>
                <input class="time_start" type="text" placeholder="请选择时间" value="" name="survey_time" onfocus="WdatePicker({ minDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="width:190px;">
            </div>
            <div class="jianrong_select" style="margin-left:30px ">
                <span>地点:</span>
                <div class="form_div_tow" style="display: inline-block;margin-left: -30px;">
                    <select  name="survey_p" id="selProvincesSurvey" onchange="region.changed(this, 2, 'selCitiesSurvey')">
                        <option value="">选择省</option>
                        <foreach name="provinces" item="row" >
                            <option value="{{$row['code']}}">{{$row['fullName']}}</option>
                        </foreach>
                    </select>
                    <select name="survey_c" id="selCitiesSurvey" onchange="region.changed(this, 3, 'selDistrictsSurvey')">
                        <option value="">选择市</option>
                    </select>
                    <select name="survey_d" id="selDistrictsSurvey">
                        <option value="">选择区</option>
                </select>
                </div>
                <input style="margin-left: 30px" type="text" name="survey_address" placeholder="具体地址">
            </div>
            <div class="jianrong jianrong_contect" style="margin-left:15px ">
                <span>联系人:</span>
                <input type="text" placeholder="请输入联系人" name="survey_contact">
            </div>
            <div class="jianrong jianrong_zhuyi">
                <span>注意事项:</span>
                <input type="text" name="survey_attention" placeholder="请输入注意事项">
            </div>
        </div>

        <div class="check2">
            <span style="margin-left: -32px;">最终审核意见</span><br><span>是否寄送：</span>
            <lable>
                <i class='input_style radio_bg radio_bg_check'><input type="radio" name="need_deliver" value="2" checked></i>
                <span>否</span>
            </lable>
            <lable>
                <i class='input_style radio_bg'><input type="radio" name="need_deliver" value="1"></i>
                <span>是</span>
            </lable>
        </div>
        <div class="text se">
            <div class="jianrong jianrong_shoujian" style="margin-left: 15px">
                <span>收件人:</span>
                <input type="text" placeholder="请输入收件人姓名 " name="receiver_name">
            </div>
            <div class="jianrong_select jianrong_form">
                <span>收件地址:</span>
                <div class="form_div_tow form_div_three" style="display: inline-block;margin-left: -30px;">
                    <select  name="receiver_p" id="selProvincesReceiver" onchange="region.changed(this, 2, 'selCitiesReceiver')">
                        <option value="">选择省</option>
                        <foreach name="provinces" item="row" >
                            <option value="{{$row['code']}}">{{$row['fullName']}}</option>
                        </foreach>
                    </select>
                    <select name="receiver_c" id="selCitiesReceiver" onchange="region.changed(this, 3, 'selDistrictsReceiver')">
                        <option value="">选择市</option>
                    </select>
                    <select name="receiver_d" id="selDistrictsReceiver">
                        <option value="">选择区</option>
                    </select>
                </div>
                <input style="margin-left: 30px" type="text" placeholder="具体收件地址" name="receiver_address">

            </div>
            <div class="jianrong jianrong_contect jianrong_con_act">
                <span>联系方式:</span>
                <input type="tel" placeholder="请输入联系方式" value="" name="receiver_phone">
            </div>
        </div>

        <div class="apply_people jianrong" style="margin-left: 15px">
            <span>申请人:</span>
            <input type="text" placeholder="请输入申请人姓名" value="" name="submitter">
        </div>
        <div class="jianrong jianrong_danwei">
            <span>申请单位:</span>
            <input type="text" placeholder="请输入申请单位全称" value="" name="submitter_company">
        </div>
        <div class="jianrong jianrong_phone">
            <span>手机号码:</span>
            <input type="text" placeholder="请输入手机号码" value="" name="validate_phone" id="validate_phone">
        </div>
        <div class="verification">
            <span>验证码：</span>
            <input class="ver_input ver_input_new" type="text" placeholder="请输入验证码" name="validate_code">
            <!--<i style="color: red">*验证码错误</i>-->
            <input type="button" class="button" value="获取验证码" onclick="settime(this,'{{:U("Home/Validate/sendCode")}}','send_apply')" name="code" value="" >
        </div>
        <div class="tijiao_true" style="width: 600px;padding-bottom: 30px;margin-top:340px;">
            <button id="submit" style="cursor: pointer">确认提交</button>
            <span id="wait_img" style="display:none;margin-left: 100px;"><img style="width:31px;" src="__PUBLIC__/default/loading-1.gif"></span>
        </div>
    </div>
</div>
</form>
<form action="{{:U('Home/Index/projectShow')}}" method="post"  id="applyform">
    <input type="hidden" id="apply_id" name="apply_id"/>
</form>

</body>

<script type="text/javascript">
    $(function(){
        $("#data").attr("href","javascript:void(0)");
        $("#data").text("");

        //表单验证
        $("#form-add").validate({
            rules: {
            },
            onkeyup: false,
            focusCleanup: true,
            success: "valid",
            submitHandler: function (form) {
                $(form).ajaxSubmit({
                    type: 'post',
                    url: "{{:U('Home/Ajax/ApplyAdd')}}",
                    beforeSend:function(){
                        $('#submit').hide();
                        $('#wait_img').show();
                    },
                    success: function (data) {
                        if (data.status) {
                            layer.msg("提交成功", {icon: 6, time: 1000});
                            setTimeout((function () {
                                $('#wait_img').hide();
                                $('#submit').show();
                                $("#apply_id").val(data.info);
                                $("#applyform").submit();
                            }), 1500);
                        } else {
                            $('#wait_img').hide();
                            $('#submit').show();
                            layer.msg(data.info, {icon: 2, time: 1000});
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                        layer.msg('error!', {icon: 5, time: 1000});
                    }
                });
            }
        });

    })

</script>

<script>
    $(function(){
        $("input[type=file]").change(function(){$(this).parents(".uploader").find(".filename").val($(this).val());});
    });
</script>
<script src="__VENDOR__/js/index.js"></script>
<script>
  $('.project_div .check i').eq(1).click(function () {
         $('.project_div .text').removeClass('se');
      $('.project_div1').addClass('gaibian_div');
      $('.project_div2').css('margin-top','80px');
  })
    $('.project_div .check i').eq(0).click(function () {
        $('.project_div .text').addClass('se');
        $('.project_div1').removeClass('gaibian_div');
        $('.project_div2').css('margin-top','40px');
    })



    $('.project_div2 .check1 i').eq(1).click(function () {
        $('.project_div2 .text1').removeClass('se');
        $('.check2').css('margin-top','360px');
    })
    $('.project_div2 .check1 i').eq(0).click(function () {
        $('.project_div2 .text1').addClass('se');
        $('.check2').css('margin-top','40px');
    })


    $('.project_div2 .check2 i').eq(1).click(function () {
        $('.project_div2 .text').removeClass('se');
        $('.project_div2 .apply_people').css('margin-top','264px');
        $('.tijiao_true').css('margin-top','560px');
    })
    $('.project_div2 .check2 i').eq(0).click(function () {
        $('.project_div2 .text').addClass('se');
        $('.project_div2 .apply_people').css('margin-top','40px');
        $('.tijiao_true').css('margin-top','340px');
    })

</script>
<script src="__VENDOR__/js/input.js"></script>

<script>
    window.onload = function(){
        region.isAdmin = false;
    };
    region.loadRegions = function(parent, type, target)
    {
        $.ajax({
            type: 'POST',
            url: '{{:U("Home/Ajax/getRegion")}}',
            data: {
                parent:parent,
                type : type
            },
            dataType: 'json',
            success: function(data){
                if(data.status){
                    var regionHtml = '<option value=\'\' selected>请选择</option>';
                    $.each(data.info,function(i,row){
                        regionHtml += "<option value='"+row.region_id+"'>"+row.region_name+"</option>"
                    })
                    $("#"+target).html(regionHtml);
                }else{
//                    layer.msg(data.info,{icon:2,time:1000});
                }
            },
            error:function(data) {
                console.log(data.msg);
            },
        });
    }
</script>

</html>